home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / UTILITY / DO1002.ARJ / EDIT.SCR < prev    next >
Text File  |  1991-12-29  |  4KB  |  132 lines

  1. .pg -24
  2. /GOSUB EditHeader
  3.     Allows the user to activate »%t«DO»#«'s built in »ye«full-screen editor»#«
  4.     or a specified external editor to create/modify the file
  5.     of their choice.
  6.  
  7.     The »%t«/EDIT»#« command uses »%t«DO»#«'s built in editor by default.  By setting
  8.     the reserved variable »ye«EDIT»#« to the name of your favorite editor, »%t«DO»#«
  9.     will use that editor instead.  For example:
  10.  
  11.     /SET EDIT TPE
  12.     /EDIT MYFILE.TXT
  13.     /SET EDIT ""
  14.  
  15.     Would set »gr«TPE»#« as the editor, edit the file MYFILE.TXT with it and
  16.     then reset the editor to the default »%t«DO»#« Internal Editor.
  17.  
  18.     »%t«DO»#«'s internal full-screen editor is capable of editing text files
  19.     up to »ma«65,000 bytes long»#« in the available memory on your computer.
  20.     It contains a full range of commands patterned after WordStar (tm).
  21. .pg wi full clr ye
  22.     THE /EDIT SCREEN
  23. »#«
  24.     The top line of the editing screen is always a status line.
  25.     The status line looks like this:
  26. »cy«
  27.     ^P Line {number} Col {number} Insert Indent Tab {drive}:{Filename}
  28. »#«
  29.     It provides the following information:
  30. .pg go 1 6
  31.     »bo«^P»cy« Line {number} Col {number} Insert Indent Tab {drive}:{Filename}
  32.  
  33. .wi 1 10 79 20 clr ye
  34.     Command Echo
  35. »#«
  36.          When the first key of a command assigned to two
  37.          keystrokes is pressed, or when the Insert control
  38.          character command ("»bo«<Ctrl-P>»#«") is given, the keystroke
  39.          is echoed at the left edge of the status line.
  40. .pg wi full go 1 6 cy
  41.     ^P »bo«Line {number}»cy« Col {number} Insert Indent Tab {drive}:{Filename}
  42.  
  43. .wi 1 10 79 20 clr ye
  44.     Line {number}
  45. »#«
  46.          Shows the number of the line containing the cursor,
  47.          counted from the start of the file.
  48. .pg wi full go 1 6 cy
  49.     ^P Line {number} »bo«Col {number}»cy« Insert Indent Tab {drive}:{Filename}
  50.  
  51. .wi 1 10 79 20 clr ye
  52.     Col {number}
  53. »#«
  54.          Shows the column number containing the cursor.
  55. .pg wi full go 1 6 cy
  56.     ^P Line {number} Col {number} »bo«Insert»cy« Indent Tab {drive}:{Filename}
  57. »#«
  58. .wi 1 10 79 20 clr ye
  59.     Insert
  60. »#«
  61.          Indicates that Insert mode is in effect.
  62. .pg wi full go 1 6 cy
  63.     ^P Line {number} Col {number} Insert »bo«Indent»cy« Tab {drive}:{Filename}
  64. »#«
  65. .wi 1 10 79 20 clr ye
  66.     Indent
  67. »#«
  68.          Indicates that Autoindent mode is in effect. »bo«<Ctrl-Q> I»#«
  69.          toggles autoindent on and off.
  70. .pg wi full go 1 6 cy
  71.     ^P Line {number} Col {number} Insert Indent »bo«Tab»cy« {drive}:{Filename}
  72. »#«
  73. .wi 1 10 79 20 clr ye
  74.     Tab
  75. »#«
  76.          Indicates that fixed tabs are in effect.
  77. .pg wi full go 1 6 cy
  78.     ^P Line {number} Col {number} Insert Indent Tab »bo«{drive}:{Filename}»#«
  79.  
  80. .wi 1 10 79 20 clr ye
  81.     {drive}:{filename}
  82. »#«
  83.          The drive, name, and extension of the file being
  84.          edited. Although the »%t«/EDIT»#« command accepts path
  85.          designations, the path name will not be displayed on
  86.          the status line.
  87. * Redisplay the edit header
  88. .pg
  89. /GOSUB EditHeader
  90.     The Editor has an extensive set of commands. It can edit files up
  91.     »ma«65,000 characters long»#« (depending on your memory). The commands
  92.     for the editor are contained in the file »ye«EDITOR.CMD»#«. You can
  93.     print this file on your printer.
  94.  
  95.     Let's create a file for you to edit. We'll copy the »cy«EDITOR.CMD»#« file
  96.     to »ye«EDITOR.TMP»#« and you can explore the editor.
  97.  
  98.     Be sure to use the »bo«<Ctrl-K>D»#«, »bo«<F10>»#« or »bo«<Alt-X>»#« keystrokes to exit
  99.     the editor when you're through experimenting with the edit commands.
  100.  
  101.     (»cy«By the way, we'll use the "»ye«Q»cy«" option of the "»ye«!»cy«" command so you won't
  102.      see the copy happen.»#«)
  103.  
  104. |!Q;COPY EDITOR.CMD EDITOR.TMP
  105. |/EDIT EDITOR.TMP
  106. /GOSUB EditHeader
  107. »ye«    Now that you have tried the built-in editor»#«
  108. /GOTOC "    Would you like to try »ma«your favorite editor»#« (Y/N)?" YN
  109. :Y
  110.  
  111. /SET Default ""
  112. /GETS EDIT Default "    Editor (Press <enter> to continue without editing:" 40 UC
  113. /IF EDIT NE "" N
  114. /EDIT EDITOR.TMP
  115. /SET EDIT ""
  116. :N
  117. /GOSUB EditHeader
  118.  
  119.     We'll leave »ye«EDITOR.TMP»#« on your disk to use in the
  120.     »%t«/ERASE»#« tutorial coming later.
  121.  
  122. /GOTO EditEnd
  123. :EditHeader
  124. .wi full clr ye
  125.     COMMAND NAME»gray«: »%t« EditFile »ye«
  126.  
  127.     /EDIT {filename}
  128. /cw
  129. /RETURN
  130. :EDITEND
  131. /ENDEXEC
  132.